﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using K.ClientOfMVC.Models;
namespace K.ClientOfMVC.Controllers
{
    public abstract class BaseController : Controller
    {
        protected MainModel mainModel;
        public BaseController()
        {
            mainModel = new MainModel();
            mainModel.appInfo = new EnterpriseLibary.Entity.AppInfo();
            mainModel.appInfo.SiteKeyWord = "彩票|宝宝起名|装修|装饰|同乡会";
            mainModel.appInfo.SiteAuthor = "SeaboSoft";
            mainModel.appInfo.SiteDescription = "综合性在线服务平台";
            mainModel.appInfo.IsOnline = "1";
            mainModel.appInfo.IsShortMenu = true;
            mainModel.appInfo.Right = "";
            mainModel.appInfo.ThemePath = "/Theme/Default";
        }

        /*
        protected override void Execute(System.Web.Routing.RequestContext requestContext)
        {
            // Add code here to set the Theme based on your database or some other storage
            requestContext.HttpContext.Items["themeName"] = "Default";

            // Allow the Theme to be overriden via the querystring
            // If a Theme Name is Passed in the querystring then use it and override the previously set Theme Name
            // http://localhost/Default.aspx?theme=Red

            var previewTheme = requestContext.HttpContext.Request.QueryString["theme"];

            if (!string.IsNullOrEmpty(previewTheme))
            {
                requestContext.HttpContext.Items["themeName"] = previewTheme;
            }

            base.Execute(requestContext);
        }
        */
    }
}
